import React, { Component } from 'react';
import R from 'ramda';

import CircularProgress from 'material-ui/CircularProgress';

import store from '../stores/main';


export default class Waiting extends Component {

    constructor(props) {
        super(props)
    }

    render() {
        const waitingStyle = {
          position: 'fixed',
          top: '50%',
          left: '45%'
        };

        let waitingSta = store.getState().waitingSta || false;
        var waitingShow = waitingSta ? { display: 'block' } : { display: 'none' };
        return (
            <div style={R.merge(waitingShow, waitingStyle)}>
              <CircularProgress size={60} thickness={7} />
            </div>
        )
    }
}
